// Member Grade Types
export interface MemberGrade {
  cardNum: number;
  createdAt: number;
  createdAtString: string;
  cycle: number;
  id: number;
  introduction: string;
  level: number;
  minRechargeAmount: number;
  name: string;
  openCardFee: number;
  price: number;
  serviceRate: number;
  sort: number;
  status: number;
  updatedAt: number;
  updatedAtString: string;
  usdRechargeRate: number;
  usdtRechargeRate: number;
  withdrawRate: number;
}

export interface MemberGradeResponse {
  list: MemberGrade[];
  total: number;
}

// Member Info Types
export interface LoginLog {
  createdAt: number;
  createdAtString: string;
  id: number;
  ip: string;
  memberId: number;
  updatedAt: number;
  updatedAtString: string;
}

export interface Wallet {
  balance: number;
  createdAt: number;
  freeze: number;
  id: number;
  memberId: number;
  type: number;
  typeString: string;
  updatedAt: number;
}

export interface MemberInfo {
  account: string;
  avatar: string;
  cardHolders: Record<string, any>;
  createdAtString: string;
  email: string;
  grade: MemberGrade;
  lastIp: string;
  lastTime: number;
  lastTimeString: string;
  loginLogs: LoginLog[] | null;
  uniqueUuid: string;
  wallets: Wallet[];
}

// Password Update Types
export interface UpdatePasswordRequest {
  oldPassword: string;
  password: string;
  passwordRepetition: string;
  verifyCode: string;
}

// Email Update Types
export interface UpdateEmailRequest {
  newEmail: string;
  newVerifyCode: string;
  verifyCode: string;
}

// Send Verify Code Types
export type SendVerifyCodeRequest = {
  email: string;
  scene?: 'UPDATE_EMAIL' | 'UPDATE_PASSWORD' | 'RETRIEVE_PASSWORD' | 'create_card_holder';
};

// Retrieve Password Types
export type RetrievePasswordRequest = {
  Email: string;
  NewPassword: string;
  NewPasswordRepetition: string;
  VerifyCode: string;
};

export type RetrievePasswordResponse = {
  success: boolean;
  message?: string;
};

// Google Authenticator Types
export interface GoogleAuthenticatorResponse {
  base64Img: string;
  googleSecret: string;
}

export interface GoogleAuthenticatorSubmitRequest {
  googleSecret: string;
  verifyCode: string;
}

export interface UnbindGoogleAuthenticatorRequest {
  pin: string;
}
